﻿@model ICollection<AuthenticationClientData>

@if (Model.Count == 0)
{
    <div class="message-info">
        <p>
            There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252166">this article</a>
            for details on setting up this ASP.NET application to support logging in via external services.
        </p>
    </div>
}
else
{
    using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
    {
    @Html.AntiForgeryToken()
  
    <div style="width: 100%; height: auto;overflow: hidden;text-align: center;">
        @foreach (AuthenticationClientData p in Model)
        {

            if (p.DisplayName.ToUpper() == "FACEBOOK")
            {
                ViewBag.background = "background: #6D84b4;";
            }
            if (p.DisplayName.ToUpper() == "TWITTER")
            {
                ViewBag.background = "background: #0EABD6;";
            }
            if (p.DisplayName.ToUpper() == "GOOGLE")
            {
                ViewBag.background = "background: #CE2516;";
            }
            if (p.DisplayName.ToUpper() == "LINKEDIN")
            {
                ViewBag.background = "background: #333;";
            }
            if (p.DisplayName.ToUpper() == "YAHOO")
            {
                ViewBag.background = "background: #4b0082;";
            }
            <button type="submit" name="provider" value="@p.AuthenticationClient.ProviderName" title="Đăng nhập bằng tài khoản  @p.DisplayName của bạn" style="height: 25px;padding-left: 10px;color: #fff;@ViewBag.background">@p.DisplayName</button>
        }
    </div>
    
    }
}
